Previous Book Contents Book Index Next

Inside Macintosh: /
QuickDraw 3D RAVE / QuickDraw 3D RAVE Reference
QuickDraw 3D RAVE Routines / Creating and Deleting Color Lookup Tables


QAColorTableNew

You can use the QAColorTableNew function to create a new color lookup table.

TQAError QAColorTableNew (
                          const TQAEngine *engine,
                          TQAColorTableType tableType,
                          void *pixelData,
                          long transparentIndexFlag,
                          TQAColorTable **newTable);
engine
A drawing engine.
tableType
The type of the new color lookup table. See "Color Lookup Table Types" (page 1-37) for information on the available color lookup table types.
pixelData
A pointer to the color lookup table entries.
transparentIndexFlag
A long integer, interpreted as a Boolean value, that indicates whether the color lookup table entry at index 0 is completely transparent (TRUE) or not (FALSE).
newTable
On entry, the address of a pointer variable. On exit, that variable points to a new color lookup table. If a new color lookup table cannot be created, *newTable is set to the value NULL.
DESCRIPTION
The QAColorTableNew function returns, through the newTable parameter, a new color lookup table associated with the drawing engine specified by the engine parameter. The table entries for the new color lookup table are copied from the block of data pointed to by the pixelData parameter; if QAColorTableNew completes successfully, you can dispose of that block of memory. The data in that block of memory is interpreted according to the format specified by the tableType parameter. For example, if tableType is kQAColorTable_CL8_RGB32, then pixelData should point to a block of data that is at least 1024 bytes long and in which each 32-bit quantity is an RGB color value.

IMPORTANT
Currently, QuickDraw 3D RAVE supports only 32-bit RGB color lookup table entries. The specified drawing engine might reduce the size of individual color lookup table entries to fit into its on-board memory.
Not all drawing engines support color lookup tables, and QuickDraw 3D RAVE does not provide color lookup table emulation for engines that do not support them.

SEE ALSO
Use the QAColorTableDelete function (next) to delete a color lookup table. Use the QATextureBindColorTable function (page 1-87) to bind a color lookup table to a texture map. Use the QABitmapBindColorTable function (page 1-90) to bind a color lookup table to a bitmap.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
28 AUG 1996